#ifndef BITUTILS_H
#define BITUTILS_H

#include "boardDefinitions.h"
#include <QDebug>

// providing bit manipulation routines
// static class
class Bitutils
{
public:
    Bitutils();

    static unsigned int count(U64);
    static unsigned int firstOne(U64);
    static unsigned int lastOne(U64);

    static bool checkBit(U64, size_t);
    static bool checkBit8(unsigned char, size_t);
    static void setBit(U64&, size_t);
    static void setBit8(unsigned char&, size_t);

    static size_t rotate90Clockwise(size_t);
    static size_t rotate90CounterClockwise(size_t);

    static U64 Bit(size_t);


    // maybe move to movegen - lazy tools
    static size_t diagA1H8RankTool(size_t);
    static size_t diagA8H1RankTool(size_t);

    // initialize attack patterns
    static void initAttacks();
};

#endif // BITUTILS_H
